访客管理API
获取访客临时密码列表
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| visitor_temp_key_id | String | Body | 访客临时密码ID |
| visitor_temp_key_name | String | Body | 访客临时密码名称 |
| visitor_temp_key_number | String | Body | 访客临时密码号码 |
| qr_code_url | String | Body | 二维码地址 |
| device_validity_count | String | Body | 设备有效次数 |
| visitor_identity_number | String | Body | 访客身份号码 |
| repeat_mode | String | Body | 重复模式 never:从不 daily:每日 weekly:每周 |
| available_days | []String | Body | 可用时间 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
| created_time | String | Body | 创建时间,UTC |
| creator | String | Body | 创建人 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_visitor_temp_key_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"visitor_temp_key_id": "vr2c4b070cc928496198944858b344fc6",
"visitor_temp_key_name": "test",
"visitor_temp_key_number": "93014275",
"qr_code_url": "https://test.akubela.com/a.png",
"device_validity_count": "",
"visitor_identity_number": "123456",
"repeat_mode": "weekly",
"available_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"start_time": "13:14:00",
"finish_time": "15:14:00",
"created_time": "2024-01-25 21:10:16",
"creator": "pm"
}
]
}
失败返回示例
见 接口失败返回
获取访客临时密码信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| visitor_temp_key_id | String | Body | 是 | 访客临时密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| visitor_temp_key_name | String | Body | 访客临时密码名称 |
| visitor_temp_key_number | String | Body | 访客临时密码号码 |
| qr_code_url | String | Body | 二维码地址 |
| device_validity_count | String | Body | 设备有效次数 |
| visitor_identity_number | String | Body | 访客身份号码 |
| residence_id | String | Body | 住宅ID |
| family_name | String | Body | 家庭名称 |
| residence_no | String | Body | 住宅号码 |
| building_id | String | Body | 楼栋ID |
| building_name | String | Body | 楼栋名称 |
| repeat_mode | String | Body | 重复模式 never:从不 daily:每日 weekly:每周 |
| available_days | []String | Body | 可用时间 |
| start_time | String | Body | 开始时间,UTC |
| finish_time | String | Body | 结束时间,UTC |
| created_time | String | Body | 创建时间,UTC |
| creator | String | Body | 创建人 |
| devices | []Object<device> | Body | 设备信息 |
device说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| building_id | String | Body | 楼栋ID |
| building_name | String | Body | 楼栋名称 |
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| mac | String | Body | MAC地址 |
| online | Boolean | Body | 判断设备在离线状态 true:在线 false:离线 |
| device_type | String | Body | 判断设备类型 Multi-tenants Doorphone:梯口机 Single-tenant Doorphone:门口机 Indoor Monitor:室内机 Guard Phone:管理机 Access Control:门禁 |
| relays | []Object<relay> | Body | 门控信息 |
| security_relays | []Object<relay> | Body | 安全门控信息 |
relay说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| relay_name | String | Body | 门控名称 |
| relay_number | String | Body | 门控拨号键值 |
| relay_id | String | Body | 门控ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_visitor_temp_key_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"visitor_temp_key_id": "vr2c4b070cc928496198944858b344fc6",
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"visitor_temp_key_name": "test",
"visitor_temp_key_number": "93014275",
"qr_code_url": "https://test.akubela.com/a.png",
"device_validity_count": "",
"visitor_identity_number": "123456",
"residence_id": "r2c4b070cc928496198944858b344fc68",
"family_name": "test",
"residence_no": "101",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"repeat_mode": "weekly",
"available_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"start_time": "13:14:00",
"finish_time": "15:14:00",
"created_time": "2024-01-25 21:10:16",
"creator": "pm",
"devices": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"device_name": "test",
"mac": "C10519082089",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"online": true,
"device_type": "Multi-tenants Doorphone",
"security_relays": [],
"relays": [
{
"relay_name": "Front Door 3",
"relay_number": "#",
"relay_id": "r4b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
]
}
]
}
失败返回示例
见 接口失败返回
获取访客临时密码设备列表
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| building_id | String | Body | 楼栋ID |
| building_name | String | Body | 楼栋名称 |
| device_id | String | Body | 设备ID |
| device_name | String | Body | 设备名称 |
| mac | String | Body | MAC地址 |
| online | Boolean | Body | 判断设备在离线状态 true:在线 false:离线 |
| device_type | String | Body | 判断设备类型 Multi-tenants Doorphone:梯口机 Single-tenant Doorphone:门口机 Indoor Monitor:室内机 Guard Phone:管理机 Access Control:门禁 |
| relays | []Object<relay> | Body | 门控信息 |
| security_relays | []Object<relay> | Body | 安全门控信息 |
relay说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| relay_name | String | Body | 门控名称 |
| relay_number | String | Body | 门控拨号键值 |
| relay_id | String | Body | 门控ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_visitor_temp_key_device_list",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"device_name": "test",
"mac": "C10519082089",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"online": true,
"device_type": "Multi-tenants Doorphone",
"security_relays": [],
"relays": [
{
"relay_name": "Front Door 3",
"relay_number": "#",
"relay_id": "r4b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
]
}
失败返回示例
见 接口失败返回
创建访客临时密码信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| visitor_temp_key_name | String | Body | 是 | 访客临时密码名称 |
| device_validity_count | String | Body | 否 | 设备有效次数 |
| visitor_identity_number | String | Body | 否 | 访客身份号码 |
| notice_email | String | Body | 否 | 通知邮箱 |
| residence_id | String | Body | 是 | 住宅ID |
| family_name | String | Body | 是 | 家庭名称 |
| residence_no | String | Body | 是 | 住宅号码 |
| building_id | String | Body | 是 | 楼栋ID |
| building_name | String | Body | 是 | 楼栋名称 |
| repeat_mode | String | Body | 是 | 重复模式 never:从不 daily:每日 weekly:每周 |
| available_days | []String | Body | 否 | 可用时间 |
| start_time | String | Body | 是 | 开始时间,UTC |
| finish_time | String | Body | 是 | 结束时间,UTC |
| devices | []Object<device> | Body | 是 | 设备信息 |
device说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| building_id | String | Body | 是 | 楼栋ID |
| device_id | String | Body | 是 | 设备ID |
| mac | String | Body | 是 | MAC地址 |
| relays | []Object<relay> | Body | 是 | 门控信息 |
| security_relays | []Object<relay> | Body | 是 | 安全门控信息 |
relay说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| relay_id | String | Body | 是 | 门控ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| visitor_temp_key_id | String | Body | 访客临时密码ID |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "create_visitor_temp_key_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"visitor_temp_key_name": "test",
"device_validity_count": "",
"visitor_identity_number": "123456",
"notice_email": "test@akubela.com",
"residence_id": "r2c4b070cc928496198944858b344fc68",
"family_name": "test",
"residence_no": "101",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"building_name": "AB01",
"repeat_mode": "weekly",
"available_days": [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
],
"start_time": "13:14:00",
"finish_time": "15:14:00",
"devices": [
{
"device_id": "d28b494e5babb46b288f4baf7fe322cc4",
"building_id": "b1a621c1ae77040d697bd2134700f57ee",
"mac": "C10519082081",
"security_relays": [],
"relays": [
{
"relay_id": "r4b5a73f8dd84abaa94dcs248be49b0d2"
}
]
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {
"visitor_temp_key_id": "v2a621c1ae77040d697bd2134700f57ea"
}
}
失败返回示例
见 接口失败返回
删除访客临时密码信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| visitor_temp_key_id | String | Body | 是 | 访客临时密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "delete_visitor_temp_key_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p31adc223cc4b3bedb6bd4742dedcfa52",
"visitor_temp_key_id": "vrbr2c4b070cc928496198944858b344f"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回
获取访客临时密码历史记录
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| page_size | Integer | Body | 是 | 每页数量 |
| page_index | Integer | Body | 是 | 当前页数 |
| visitor_temp_key_id | String | Body | 是 | 访客临时密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | []Object<result> | Body | 返回结果 |
result说明
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| open_door | Boolean | Body | 判断开门是否成功 true:成功 false:失败 |
| account_name | String | Body | 账号名称 |
| device_name | String | Body | 设备名称 |
| capture_thumbnail_url | String | Body | 抓拍缩略图地址 |
| open_door_type | String | Body | 开门类型 |
| capture_picture_url | String | Body | 抓拍图地址 |
| open_door_time | String | Body | 开门时间 |
| residence_no | String | Body | 住宅号码 |
| building_name | String | Body | 楼栋名称 |
| record_type | String | Body | 记录类型 |
| number | String | Body | 号码 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "get_visitor_temp_key_history",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"page_size": 1,
"page_index": 1,
"visitor_temp_key_id": "vr2c4b070cc928496198944858b344fc6",
"project_id": "pr31adc223cc4b3bedb6bd4742dedcfa5"
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1724816274618,
"result": [
{
"open_door_time": "2020-05-18 15:25:45",
"building_name": "test",
"device_name": "device",
"account_name": "tom",
"residence_no": "121",
"record_type": "open door",
"open_door_type": "temp key",
"number": "12314134",
"open_door": true,
"capture_thumbnail_url": "https://test.akubela.com/r.jpg",
"capture_picture_url": "https://test.akubela.com/d.jpg"
}
]
}
失败返回示例
见 接口失败返回
批量删除访客临时密码信息
接口地址
POST /api/v1.0/invoke/open-ability/method/manager-commands
请求参数
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| Content-Type | String | Header | 是 | 内容类型,值为application/json |
| Accept | String | Header | 是 | 接受类型,值为application/json |
| Authorization | String | Header | 是 | Bearer认证,访问令牌 |
| command | String | Body | 是 | 命令名称 |
| id | String | Body | 是 | 命令ID |
| param | Object<param> | Body | 是 | 命令参数 |
param说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| project_id | String | Body | 是 | 项目ID |
| visitor_temp_keys | []Object<visitor_temp_key> | Body | 是 | 访客临时密码信息 |
visitor_temp_key说明
| 参数名 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
| visitor_temp_key_id | String | Body | 是 | 访客临时密码ID |
返回参数
| 参数名 | 类型 | 位置 | 说明 |
|---|---|---|---|
| Content-Type | String | Header | 内容类型,值为application/json |
| success | Boolean | Body | 判断请求是否成功 true:成功 false:失败 |
| timestamp | Integer | Body | 时间戳 |
| result | Object | Body | 返回结果 |
请求示例
POST /api/v1.0/invoke/open-ability/method/manager-commands
Content-Type: application/json
Accept: application/json
Authorization: Bearer ac45e846ca23ab42c9ae469d988ae32a9
{
"command": "batch_delete_visitor_temp_key_info",
"id": "c45e846ca23ab42c9ae469d988ae32a96",
"param": {
"project_id": "p01adc223cc4b3bedb6bd4742dedcfa52",
"visitor_temp_keys": [
{
"visitor_temp_key_id": "v8b5a73f8dd84abaa94dcs248be49b0d1"
}
]
}
}
成功返回示例
状态码:200
Content-Type: application/json
{
"success": true,
"timestamp": 1540869200562,
"result": {}
}
失败返回示例
见 接口失败返回